export const imgerror = {
  // inserted DOM节点插入的时候
  inserted(img, binding) {
    img.onerror = () => {
      img.src = binding.value
    }
  },
  // 组件加载失败的时候
  componentUpdated(img, binding) {
    img.src = binding.src || binding.value
  }
}
